4437
22051
Voglio ricevere testo dal web, ho scritto codice, uso indexOf e subString, ma non funziona.
int index = response_str.indexOf ("Indirizzo IP remoto:");
index + = "Indirizzo IP remoto:". length ();
index + = "

". length (); int end = response_str.indexOf ("


", index); Stringa strIP = response_str.substring (index, end); Log.d ("", "Hello" + strIP); E questo è un testo di esempio, voglio ottenere 49.156.53.152
Indirizzo IP remoto:

** 49.156.53.152 **


Agente utente:

Mozilla / 5.0 (Windows NT 6.1; WOW64) AppleWebKit / 537.11 (KHTML, come Gecko) Chrome / 23.0.1271.64 Safari / 537.11